add readFromDeltaLake transform#4027
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #4027 +/- ##
=============================================
- Coverage 55.68% 38.09% -17.59%
+ Complexity 7236 511 -6725
=============================================
Files 1124 195 -929
Lines 68447 11759 -56688
Branches 7721 1176 -6545
=============================================
- Hits 38117 4480 -33637
+ Misses 27856 6914 -20942
+ Partials 2474 365 -2109
🚀 New features to boost your workflow:
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Apache Beam transform, ReadFromDeltaLake, to read data from Delta Lake tables, along with its corresponding unit tests and the deltalake dependency. The review feedback highlights critical improvements: replacing load_as_version with load_as_datetime when handling timestamp strings, and refactoring the table reading logic to use to_pyarrow_dataset().to_batches() to prevent Out Of Memory (OOM) errors on large datasets. Additionally, the unit tests should be updated to reflect these batching and datetime methods, and the storage configuration should avoid unsupported Hadoop keys like fs.gs.impl.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new Apache Beam transform, ReadFromDeltaLake, to read data from Delta Lake tables, along with its registration in the provider listing and the addition of the deltalake dependency. The review feedback highlights two critical runtime issues in the implementation: first, pyarrow.RecordBatch does not support to_pylist(), which will raise an AttributeError (using to_pydict() is suggested instead); second, loading a table by timestamp requires load_with_datetime rather than load_as_version. The reviewer also provided corresponding suggestions to update the unit tests to align with these fixes.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request adds support for reading data from Delta Lake tables into Apache Beam pipelines. It includes the necessary transform logic, updates the project dependencies to include the deltalake library, and provides unit tests to ensure the new functionality works as expected. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new Apache Beam transform, ReadFromDeltaLake, along with its corresponding DoFn and unit tests, to enable reading data from Delta Lake tables. The review feedback highlights a critical runtime bug where pyarrow.RecordBatch.to_pylist() is called instead of to_pydict(), which was masked by mock objects in the tests. Additionally, the feedback suggests handling conflicting version and timestamp parameters by raising a ValueError and optimizing the DeltaTable initialization, alongside updating the unit tests to reflect these changes.
Uh oh!
There was an error while loading. Please reload this page.